package com.dnjn.mes.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.mes.common.annotation.Excel;
import com.dnjn.mes.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 异常解决方案表
 * </p>
 *
 * @author Amber
 * @since 2023-07-27
 */
@Getter
@Setter
@TableName("mes_resolve_plan")
public class MesResolvePlan extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @TableId(value = "plan_id", type = IdType.ASSIGN_ID)
    private Long planId;

    @Excel(name = "故障解决方案")
    @TableField("`description`")
    @NotBlank(message = "故障解决方案不能为空")
    private String description; //resolvePlan

    private Integer ordinal;

    @NotNull(message = "workpieceId不能为空")
    private Long workpieceId;

    /* ext field*/
    @JsonIgnore
    @TableField(exist = false)
    @Excel(name = "机器名")
    private String equipmentName;
    @JsonIgnore
    @TableField(exist = false)
    @Excel(name = "模块名")
    private String assemblyName;
    //@JsonIgnore
    @TableField(exist = false)
    @Excel(name = "零部件名称")
    private String workpieceName;
    @TableField(exist = false)
    @Excel(name = "所属异常ID")
    private Long exceptId;

    private Long equipmentId;

}
